<style type="text/css">
a {
	color:#F00;
	text-decoration:none
}
a:hover {
	color:#F60;
	text-decoration:underline
}
#authenticate {
	height: 305px;
	width: 500px;
	text-align: center;
	line-height: 25px;
	border: 1px solid #666;
}
.alignright {
	float: left;
	margin-top: 15px;
}
</style>
<script>
<?php
if($msg){
?>
alert('<?=$msg?>');
<?php
}
?>
<?php
if($msg=='密碼更新成功'){
?>
parent.location.reload(true);
<?php
}
?>
function pwcheck(){
	var oldpwd = document.getElementById('oldpwd').value;
	var newpwd = document.getElementById('newpwd').value;
	var renewpwd = document.getElementById('renewpwd').value;
	if(oldpwd==''){
		alert('舊密碼不能為空');
		return false;
	}
	if(newpwd==''){
		alert('新密碼不能為空');
		return false;
	}
	if(renewpwd!=newpwd){
		alert('兩次輸入的密碼不一致');
		return false;
	}
	document.form1.submit();

}
</script>
<div id="authenticate"><img src="images/changePassword.png" alt="更改密碼" title="更改密碼" width="500" height="35" />
   <div style="background:url(images/lock99.png) no-repeat left center;margin-top:10px; height:260px">
	<form id="form1" name="form1" method="post" action="" style="float:right; margin-top:10px; width:335px; text-align:left">
      <p>輸入舊密碼：
      <input type="password" name="oldpwd" id="oldpwd" />&nbsp;
      
      <br />
      <p>
      輸入新密碼：
      <input type="password" name="newpwd" id="newpwd" />&nbsp;
      
      <br />
      <p>
      再一次輸入新密碼：
      <input type="password" name="renewpwd" id="renewpwd" />&nbsp;
      
      <br />
      <p>
      <input type="reset" name="button" id="button" value="重設" />
	  <input type="button" name="button" onclick="pwcheck()" id="button" value="送出" />
      
      <br />
      </p>
    </form>    
  </div>
</div>